import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import config, { Config } from './env/index';

const dbConfig = (config() as Config).db;

@Module({
  imports: [
    TypeOrmModule.forRoot({
      ...dbConfig,
    }),
  ],
})
export class DBModule {
  constructor() {
    console.log('初始化DBModule');
  }
}
